var $ = jquery = layui.jquery;
var layer = layui.layer;



//index_book
$("#addBookBt").click(function(){
   layer.open({
        type: 1,
        title:"添加书籍推荐",
        content: $('#controladdIndexbook'),
        area:["500px","400px"],
        btn: ['确定', '取消'],
        yes: function(index, layero){
           alert("点击了确认");
          layer.close(index); 
        }
   });
})

$("body").on("click","#index_bookTable .edit",function(){
    layer.open({
        type: 1,
        title:"修改推荐",
        content: $('#controlEditIndexbook'),
        area:["500px","440px"],
        btn: ['确定', '取消'],
        yes: function(index, layero){
           alert("点击了确认");
          layer.close(index); 
        }
   });
})


$("body").on("click","#index_bookTable .del",function(){
    layer.confirm('确定 <span class="red">取消</span> 此推荐吗?', {icon: 3, title:'提示'}, function(index){
        alert("点击了确认");
          layer.close(index);
    });
})




